<?php

namespace app\common\model;

use think\Model;
use think\Request;

/**
 * @property bool $is_default 默认 0=否 1=是
 * @property int $user_address_id
 * @property int $user_id 对应user表
 * @property string $address 详细地址
 * @property string $area
 * @property string $city
 * @property string $consignee 姓名
 * @property string $is_delete 0=未删 1=已删
 * @property string $mobile 手机号码
 * @property string $province 所在地区
 * @property string $tel 电话
 */
class UserAddress extends BaseModel
{
    // 表名
    protected $table = 'user_address';
    protected $pk = 'user_address_id';
    const primaryKey = 'user_address_id';

    // 追加属性
    protected $append = [

    ];

    public static function __make(Request $request)
    {
        return (new self())->find($request->param(self::primaryKey));
    }
}
